import request from '@/utils/request'

export default {
  planList(params) {
    return request({
      url: '/v1/planList?category=1',
      method: 'get',
      params
    })
  },
  getOne(id) {
    return request({
      url: `/v1/plan/${id}`,
      method: 'get'
    })
  },
  update(data) {
    return request({
      url: '/v1/planUpdate',
      method: 'post',
      data
    })
  },
  create(data) {
    return request({
      url: '/v1/planAdd',
      method: 'post',
      data
    })
  },
  delete(data) {
    return request({
      url: '/v1/planDel',
      method: 'post',
      data
    })
  },
  append(data) {
    return request({
      url: '/v1/planAppend',
      method: 'post',
      data
    })
  },
  remove(data) {
    return request({
      url: '/v1/planRemove',
      method: 'post',
      data
    })
  },
  appendMember(data) {
    return request({
      url: '/v1/planMemberAppend',
      method: 'post',
      data
    })
  },
  removeMember(data) {
    return request({
      url: '/v1/planMemberRemove',
      method: 'post',
      data
    })
  },
  appendParts(data) {
    return request({
      url: '/v1/planPartsAppend',
      method: 'post',
      data
    })
  },
  removeParts(data) {
    return request({
      url: '/v1/planPartsRemove',
      method: 'post',
      data
    })
  },
  appendTask(data) {
    return request({
      url: '/v1/planTaskAppend',
      method: 'post',
      data
    })
  },
  removeTask(data) {
    return request({
      url: '/v1/planTaskRemove',
      method: 'post',
      data
    })
  },
  appendTaskGroup(data) {
    return request({
      url: '/v1/planTaskGroupAppend',
      method: 'post',
      data
    })
  },
  excel(data) {
    return request({
      url: '/v1/plan2Excel',
      method: 'post',
      data
    })
  },
  excelUpdate(data) {
    return request({
      url: '/v1/plan2ExcelUpdate',
      method: 'post',
      data
    })
  }
}
